package company.maestro;

import java.io.Serializable;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Student implements Serializable {

  long		id;
  long		classId = -1;
  String 	firstName;
  String 	lastName;
  String	guardianName;
  String	guardianPhoneNumber;
  String	guardianEmail;
  Date 		created;
  
  
  public void setClassId(long _classId)
  {
	  this.classId = _classId;
  }
  
  
  public long getClassId()
  {
	  return this.classId;
  }
  
  
  
  public void setGuardianName(String _guardianName)
  {
	  this.guardianName = _guardianName;
  }
  
  
  public void setGuardianPhone(String _guardianPhone)
  {
	  this.guardianPhoneNumber = _guardianPhone;
  }
  
  
  public void setGuardianEmail(String _guardianEmail)
  {
	  this.guardianEmail = _guardianEmail;
  }
  
  
  public long getId()
  {
	  return this.id;
  }
  
  public String getFirstName() 
  {
    return firstName;
  }
  
  
  public String getLastName()
  {
	  return lastName;
  }
  
  
  public String getGuardianName()
  {
	  return guardianName;
  }
  
  
  public String getGuardianPhoneNumber()
  {
	  return guardianPhoneNumber;
  }
  
  
  public String getGuardianEmail()
  {
	  return guardianEmail;
  }
  
  public Date getCreated() {
    return created;    
  }
  
  public Student(String _firstName, String _lastName, String _guardianName, 
		  String _guardianPhone, String _guardianEmail, Date _created)
  {
	  firstName = _firstName;
	  lastName = _lastName;
	  created = _created;
	  guardianName = _guardianName;
	  guardianPhoneNumber = _guardianPhone;
	  guardianEmail = _guardianEmail;
	  created = _created;
  }

  public Student(String _firstName, String _lastName) 
  {
    this(_firstName, _lastName, new Date(java.lang.System.currentTimeMillis()));
  }
  
  public Student(String _firstName, String _lastName, Date _created) 
  {
    this(_firstName, _lastName, "", "", "", _created);
  }
  
  
  public Student(long _id, String _firstName, String _lastName, Date _created) 
  {
	this(_id, _firstName, _lastName, "", "", "", _created);
  }
  
  
  public Student(long _id, String _firstName, String _lastName, String _guardianName, 
		  String _guardianPhone, String _guardianEmail, Date _created)
  {
	  this.id = _id;
	  firstName = _firstName;
	  lastName = _lastName;
	  created = _created;
	  guardianName = _guardianName;
	  guardianPhoneNumber = _guardianPhone;
	  guardianEmail = _guardianEmail;
	  created = _created;
  }
  

  @Override
  public String toString() 
  {
    SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yy");
    String dateString = sdf.format(created);  
    return "(" + dateString +  ") " + firstName + " " + lastName; 
  }
}